package com.mylove.bindviewlib;

import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import android.util.Log;
import android.widget.TextView;

import com.benyanyi.viewbind.ViewBind;
import com.benyanyi.viewbind.annotation.BindString;
import com.benyanyi.viewbind.annotation.BindView;
import com.benyanyi.viewbind.annotation.OnClick;

/**
 * @author YanYi
 * @date 2019/3/1 17:27
 * @email ben@yanyi.red
 * @overview
 */
public class IndexActivity extends AppCompatActivity {
    @BindView(R.id.msg)
    private TextView msg;
    @BindString(R.string.app_name)
    private String appName;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.act_main);
        ViewBind.bind(this);
        Log.v("appname", appName);
    }

    @OnClick(value = R.id.but, isDoubleClick = true, isCheckNet = true, netErrorMsg = "没有连接网络")
    public void onClick() {
//        Log.v("测试", "点击");
//        Toast.makeText(this, "测试", Toast.LENGTH_SHORT).show();
        new TestDialog(this).show();
    }
}
